#include <stdio.h>
int main(){
    FILE* rp, *wp;
    char fileName[20];
    printf("输入文件名：");
    scanf("%s", fileName);
    rp = fopen(fileName, "r");
    if(rp == NULL) return -1;

    wp = fopen("copy", "w+");
    if(wp == NULL) return -1;


    char data[256];
    size_t len;
    while(1){
        len = fread(data, sizeof(char), 256, rp);
        
        fwrite(data, sizeof(char), len, wp);
        if(feof(rp)) break;
    }
    fclose(rp);
    fclose(wp);
    printf("done");
    return 0;
}